﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="easybbs_topic.aspx.cs" Inherits="easybbs_topic" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <style type="text/css">
        .title{
            font-size:18pt;
            font-weight: bold;
        }
        .author{
            font-size:10pt;
            color: #A20010; 
            vertical-align: middle;
        }
        .authorline{
            width: 100%; 
            border-bottom: #BECDE5 1px solid; 
            text-align: center; 
            height: 30px; 
            vertical-align: middle;
        }
        .content{
            font-size:12pt;
            text-align: left; 
            line-height: 16pt; 
            letter-spacing: 0.2pc;
        }
        .contentborder{
            border-right: #BECDE5 1px solid; 
            border-top: #BECDE5 1px solid; 
            border-left: #BECDE5 1px solid; 
            border-bottom: #BECDE5 1px solid; 
            background-color: #f5fafe;
        }
        .contentborder2{
            border-right: #BECDE5 1px solid; 
            border-top: #BECDE5 1px solid; 
            border-left: #BECDE5 1px solid; 
            border-bottom: #BECDE5 1px solid; 
            background-color: #ffffff;
        }
        .bottomfont
		{
			font-size: 10pt;
			color: #a9a9a9;
		}
    </style>
    <script language=javascript src="./js/Function.js"></script>
    <script language=javascript src="./js/myCheck.js"></script>
	<script type="text/javascript" src="./jquery/126/jquery-1.2.6.js"></script>	<script type="text/javascript" src="./jquery/jquery.textLimiter.js"></script>	<script type="text/javascript">        function forum_chk()
        {
			if(CheckText2(form1.txtforum,"回复内容",150)==false) return false;
			return true;
        }
        function forum_save()
        {
	        $.ajax({	            url:'./ajax/forum_save.aspx',	            type:'post',	            data: "userid="+$("#myuid2").val()+"&topicid="+$("#topicid2").val()+"&forumcontent="+escape($("#txtforum").val()),	            beforeSend:function()	            {	                return forum_chk();	            },	            success: function()	            {	                forum_list();	            }	        });        };
        
        function forum_list()
        {
	        $.ajax({	            url:'./ajax/forum_list.aspx',	            type:'get',	            data: "topicid="+$("#topicid2").val()+'&_='+(new Date()).getTime(),	            dataType:'html',	            beforeSend:function()	            {	                $("#forumlist").empty().append("<img id='loading' src='./images/loading2.gif' />正在加载,请稍等......");	            },	            error:function()	            {	                $("#forumlist").empty().append("read error!");	            },	            success: function(msg)	            {	                $("#forumlist").empty().append(msg);	            }	        });        }
	    $(document).ready(function(){           forum_list();           $("#txtforum").textLimiter();	    });		</script></head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="0" cellpadding="0" cellspacing="0" width="80%" align="center">
            <tr>
                <td align="center" class="contentborder">
                    <div style="padding-left:20px; padding-right: 20px; padding-bottom: 20px; padding-top: 20px;">
                        <div id="topictitle" runat="server" class="title"></div>
                        <div class="authorline">
                            <br /><div id="authortime" runat="server" class="author"></div>
                        </div>
                        <div id="topiccontent" runat="server" class="content"></div>
                    </div>
                </td>
            </tr>
         </table>
        <table border="0" cellpadding="0" cellspacing="0" width="80%" align="center">
            <tr>
                <td align="left" class="contentborder2" width="100%">
                    <div style="padding-left:20px; padding-right: 20px; padding-bottom: 20px; padding-top: 20px;">
                        <div id="forumlist"></div>
                    </div>
                </td>
            </tr>
         </table>
		<table width="80%" border="0" cellpadding="8" cellspacing="1" bgcolor="#a4b6d7" align="center">
			<tr>
				<td bgcolor="#f2f8ff" valign="middle" align="right" width="100" nowrap style="font-weight: bold; font-size: 10pt; color: black">回复内容：<br />(150字符内)</td>
				<td bgcolor="#f2f8ff">
					<textarea id="txtforum" maxlength="150" style="width: 500px; height: 110px"></textarea><br>
					<font color="red" style="FONT-SIZE: 9pt">您要为您所发言论的后果负责，故请各位遵纪守法并注意语言文明。</font>
					<input type="button" id="btnSubmit" value="提交" onclick="forum_save()" style="width: 80px" />
				</td>
			</tr>
		</table><br />
         <table border="0" cellpadding="0" cellspacing="0" width="80%" align="center">
            <tr height=40>
            <td>
                <div style="border-bottom: darkgray 1px solid;"></div>
                <span class="bottomfont">SEEC&copy;2008-2009 汽车中国</span>
            </td>
            </tr>
        </table>
    </div>
    <div id="myhidediv" style="VISIBILITY: hidden;"><asp:TextBox ID="myuid2" runat="server"></asp:TextBox><asp:TextBox ID="topicid2" runat="server"></asp:TextBox></div>
    </form>
</body>
</html>
